import { makeAutoObservable } from "mobx";
import http from '../utils/http';

class C2banner{
    constructor(){
        makeAutoObservable(this)
    }
    asyncEdit(){
        let id=sessionStorage.getItem('bannerId');
        http({
            url:'/yanghao/queryBannerById',
            method:'get',
            data:{
                id
            }
        }).then(res=>{
            this.name=res.data.resData1[0].name;
            this.discribe=res.data.resData1[0].discribe;
        })
    }
    //---
    name='';
    discribe='';

    editName(name){
        this.name=name;
    }
    editDiscribe(discribe){
        this.discribe=discribe;
    }
    
}

const c2bannerMobx = new C2banner();
export default c2bannerMobx;